class HandlerDeleteButton:

    @staticmethod
    def delete_elem(dct, key):
        new_dct = {}
        del dct[str(key)]

        for k, v in zip(range(1, len(dct) + 1), dct.values()):
            new_dct[str(k)] = v
            v.index = str(k)

        return new_dct
